<!DOCTYPE html>
<html>
<head>
#include("../../_common/head.html")
<title>参数列表</title>
</head>
<body class="pear-container">
    <div class="layui-panel query-panel /*查询面板*/">
        <form class="layui-form layui-row layui-col-space16" lay-filter="query-form" onsubmit="return false;">
        	<div class="layui-col-xl2 layui-col-lg2 layui-col-md2 layui-col-sm3 layui-col-xs6">
				<div class="layui-input-wrap">
					<div class="layui-input-prefix">
						<i class="pear-icon pear-icon-text"></i>
					</div>
					<input type="text" name="word" value="#(word??)" placeholder="模糊查询" autocomplete="off" class="layui-input" lay-affix="clear">
				</div>
		    </div>
        	<div class="layui-col-xl2 layui-col-lg2 layui-col-md2 layui-col-sm3 layui-col-xs6">
				<div class="layui-input-wrap">
                    <select name="type">
                        <option value="">-- 状态 --</option>
                    #DICTS(type="config_type")
                    #for(item : dicts)
                        <option value="#(item.value)"#if(type?? == item.value) selected#end>#(item.label)</option>
                    #end
                    </select>
                </div>
            </div>
            <div class="layui-col-xl2 layui-col-lg2 layui-col-md2 layui-col-sm3 layui-col-xs6">
                <div class="layui-btn-group">
                    <button type="button" class="layui-btn layui-btn-sm query-form-search">
                        <i class="layui-icon layui-icon-search"></i> 搜索
                    </button>
                    <button type="button" class="layui-btn layui-btn-sm layui-btn-primary query-form-reset">
                        <i class="layui-icon layui-icon-refresh"></i> 重置
                    </button>
                </div>
            </div>
        </form>
    </div>
    <div class="layui-panel data-panel /*数据面板*/">
        <table id="data-table"></table>
    </div>

<!-- 类型字段 -->
<script type="text/html" id="bean-configType">
<!-- #DICTS(type="config_type")#for(item : dicts) -->
#[[{{# if(d.type == ']]##(item.value)#[[') { }}]]#
<span class="#(item.listClass)">#(item.label)</span>
#[[{{# } }}]]#
<!-- #end -->
</script>

#set(tableButtonsHtml = '')
#set(recordButtonsHtml = '')
#include("../../_common/data_table_template.html"
    , customTableButtons = tableButtonsHtml
    , customRecordButtons = recordButtonsHtml
)

#include("../../_common/foot.html")

<script type="text/javascript">
/*
 * 定义权限开关
 */
var RIGHTS = { NONAME: null // 无用，占个位
//#authPermissions('system:config:add')
    ,add: true
//#end
//#authPermissions('system:config:edit')
    ,edit: true
//#end
//#authPermissions('system:config:del')
    ,remove: true
    ,batchRemove: true
//#end
//#authPermissions('system:config:query')
    ,detail: true
//#end

};

/*
 * 模块操作路径
 */
var MODULE_PATH = "#CTX()/admin/system/config/";

/*
 * 默认弹窗大小
 */
var POPUP_AREA = ['720px', '95%'];

/*
 * 数据表的OPTIONS
 */
var OPTIONS = {
    initSort: {'field': 'type', 'type': 'asc'},
    cols: [[
        {type: 'checkbox', align: 'center', width: 60},
        {field: 'name', align: 'left', minWidth: 130, width: '10%', sort: true, title: '参数名'},
        {field: 'code', align: 'left', minWidth: 150, width: '14%', sort: true, title: '参数代码'},
        {field: 'value', align: 'left', minWidth: 150, width: '15%', sort: true, title: '参数值'},
        {field: 'type', align: 'center', width: 110, sort: true, title: '参数类型', templet: '#bean-configType'},
        {field: 'isSys', align: 'center', width: 110, sort: true, title: '系统类型', templet: '#bean-isSys'},
        {field: 'remark', align: 'left', minWidth: 150, width: '15%', title: '说明'},
        {field: 'createdDatetime', align: 'center', width: 160, sort: true, title: '创建时间', templet: '#bean-createdDatetime'},
        {toolbar: '#record-toolbar', align: 'left', minWidth: 160}
    ]]
};
</script>

<script src="#CTX()/admin/js/query_form.js?_v=#VERSION()"></script>
<script src="#CTX()/admin/js/data_table.js?_v=#VERSION()"></script>

<script type="text/javascript">
/*
 * Layui相关脚本
 */
layui.use(['jquery', 'common'], () => {
    var $ = layui.jquery, common = layui.common;
    
    /*
     * 页面加载完成时加载表格数据
     */
    $(document).ready(() => {
        window.dataTable.search();
    });
});
</script>
</body>
</html>
